package com.appkubes.mall.core.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 订单主表(驱动表): 汇总各业务状态信息,自己不存储业务信息
 * @author Rongjie
 */
@Data
@TableName("mall_order")
@KeySequence(value = "mall_order_SEQ")
@ApiModel(value = "MallOrder对象")
public class MallOrder implements Serializable{

       @ApiModelProperty(value = "appkey")
       private String appKey;

       @TableId(value = "order_key", type = IdType.UUID)
       private String orderKey;

       private String userKey;

       @ApiModelProperty(value = "订单号")
       private String orderNo;

       @ApiModelProperty(value = "运费")
       private BigDecimal deliveryMoney;

       @ApiModelProperty(value = "总金额")
       private BigDecimal amount;

       @ApiModelProperty(value = "支付状态 1已支付 ", example = "1")
       private Integer payState;

       @ApiModelProperty(value = "支付总金额")
       private BigDecimal payAmount;

       @ApiModelProperty(value = "附加商品金额")
       private BigDecimal additionMoney;

       @ApiModelProperty(value = "使用积分进行支付时，消费的积分分数")
       private BigDecimal payCredits;

       @ApiModelProperty(value = "使用账户余额进行支付")
       private BigDecimal payBalance;

       @ApiModelProperty(value = "支付时间", example = "1")
       private Integer payTime;

       private Integer createTime;

       @ApiModelProperty(value = "确认收货时间完成时间", example = "1")
       private Integer confirmTime;

       @ApiModelProperty(value = "订单取消时间", example = "1")
       private Integer cancelTime;

       @ApiModelProperty(value = "unPay未支付（待支付）；payFail（支付失败）；paySuccess支付成功（待配送）；sending配送中；arrive送达（待自提）；completed已完成cancel已取消cancel已取消shortage缺货取消")
       private String status;

       @ApiModelProperty(value = "订单原因")
       private String msg;

       @ApiModelProperty(value = "1 删除", example = "1")
       private Integer isDelete;

       @ApiModelProperty(value = "是否显示", example = "1")
       private Integer isShow;

       private Integer updateTime;

       private Integer expireTime;

       @ApiModelProperty(value = "已收押金")
       private BigDecimal depositMoney;

       @ApiModelProperty(value = "支付类型,默认0 1是微信,2是支付宝,3是积分支付,4是分期支付，5是后台免支付下单", example = "1")
       private Integer payType;

       @ApiModelProperty(value = "是否执行 0 默认,1已完成", example = "1")
       private Integer isImplement;

       @ApiModelProperty(value = "订单类型1、普通订单 2、团购单", example = "1")
       private Integer orderType;

       @ApiModelProperty(value = "部分可自提；该状态仅针对配送中订单；0:不可自提；1:存在部分可自提", example = "1")
       private Integer isPartiallyCompelete;

       @ApiModelProperty(value = "电话")
       private String mobile;

       @ApiModelProperty(value = "收货人")
       private String name;

       @ApiModelProperty(value = "收获地址")
       private String address;

       @ApiModelProperty(value = "地址id")
       private String addressKey;

       @ApiModelProperty(value = "商品数量", example = "1")
       private Integer goodsNum;

       @ApiModelProperty(value = "用户来源；platform:平台内部；saas_point:积分商城免登录；zulin:租赁商城")
       private String userOrigin;

       @ApiModelProperty(value = "快递公司代码")
       private String sendKdCode;

       @ApiModelProperty(value = "发货单号")
       private String sendOrderno;

       @ApiModelProperty(value = "退货单号")
       private String backOrderno;

       @ApiModelProperty(value = "是否评价", example = "1")
       private Integer isComment;

       @ApiModelProperty(value = "分期期数", example = "1")
       private Integer periods;

       @ApiModelProperty(value = "是否收款，0收款（全款），1未收款，2部分收款", example = "1")
       private Integer isCollected;

       @ApiModelProperty(value = "欠款金额")
       private BigDecimal owingAmount;

       @ApiModelProperty(value = "需要消费的授信额度，在下单成功后，进行扣除")
       private BigDecimal useDepositMoney;

       @ApiModelProperty(value = "RENT")
       private String flexType;

       private String flexSegment1;

       private String flexSegment2;

       private String flexSegment3;

       @ApiModelProperty(value = "版本号", example = "1")
       @Version
       private Integer version;

}
